<template>
  <input type="button" value="按钮1" v-on:click="f()">
  <input type="button" value="按钮2" @click="f()">
  <h3>回车按下事件</h3>
  <input type="text" @keydown.enter="ent()">
</template>

<script setup>
const ent = ()=>{
  alert("登录成功!");
}
  const f = ()=>{
    console.log("点击了!");
  }
</script>

<style scoped>

</style>